const Layout = () => import(/* webpackChunkName: 'index' */ '@/page/layout/main.vue')


const staticRouters = [
    {
        path: '/',
        redirect: '/displays'
    },
    {
        path: '/error',
        component: () => import(/* webpackChunkName: 'error' */ '@/page/error'),
        children: [
            {
                path: '401',
                component: () => import(/* webpackChunkName: 'error' */ '@/page/error/401')
            },
            {
                path: '403',
                component: () => import(/* webpackChunkName: 'error' */ '@/page/error/403')
            },
            {
                path: '404',
                component: () => import(/* webpackChunkName: 'error' */ '@/page/error/404')
            },
            {
                path: '500',
                component: () => import(/* webpackChunkName: 'error' */ '@/page/error/500')
            }
        ]
    },
    {
        path: '/login',
        component: () => import(/* webpackChunkName: 'login' */ '@/page/login'),
    },
    {
        name: 'displaysEdit',
        path: '/displays/edit/:id',
        component: () => import(/* webpackChunkName: 'components' */ '@/page/displays/display'),
    },
    {
        name: 'displaysPreview',
        path: '/displays/preview/:id',
        component: () => import(/* webpackChunkName: 'components' */ '@/page/displays/preview'),
    }
]
const appRouters = [
    {
        path: '/displays',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'components' */ '@/page/displays/list'),
            }    
        ]
    },{
        path: '/databases',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'components' */ '@/page/database/list')
            }
        ]
    },{
        path: '/sqls',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'components' */ '@/page/sql/list')
            }
        ]
    }, {
        path: '/apis',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'components' */ '@/page/api/list')
            }
        ]
    }, {
        path: '/drill',
        component: Layout,
        children: [
            {
                path: '',
                component: () => import(/* webpackChunkName: 'components' */ '@/page/drill/list')
            }
        ]
    }
]

export const routers = [
    ...appRouters,
    ...staticRouters,
    
]